<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>26-计算属性基本用法</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <style></style>
  </head>
  <body>
    <div id="app">
      <span>{{info}}</span>
      <span>{{reverString}}</span>
    </div>
    <script>
      var vm = new Vue({
        el: '#app',
        data: {
          info: 'Hello',
        },
        methods: {},
        computed: {
          reverString: function () {
            return this.info.split('').reverse().join('');
          },
        },
      });
    </script>
  </body>
</html>
